from models.base import BaseModel, db


class AlbumRecordMaterial(BaseModel):
    __tablename__ = 'album_record_material'
    __table_args__ = {'comment': '短剧备案材料表模型'}

    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    album_info_id = db.Column(db.BigInteger, nullable=False, comment='短剧信息ID')
    name = db.Column(db.String(255), nullable=False, comment='剧名')
    duration = db.Column(db.Integer, nullable=False, comment='平均单集时长，单位分钟')
    seqs_count = db.Column(db.Integer, nullable=False, comment='集数')
    production_organisation = db.Column(db.String(255), nullable=False, comment='制作机构')
    director = db.Column(db.JSON, nullable=False, comment='导演')
    producer = db.Column(db.JSON, nullable=False, comment='制作人')
    actor = db.Column(db.JSON, nullable=False, comment='演员')
    summary = db.Column(db.Text, nullable=False, comment='内容梗概')
    cost_distribution_image_id = db.Column(db.BigInteger, nullable=False, comment='成本配置比例情况')
    assurance_image_id = db.Column(db.BigInteger, nullable=False, comment='承诺书')
    # cost_distribution_uri = db.Column(db.String(255), nullable=False, comment='成本配置比例情况')
    # assurance_uri = db.Column(db.String(255), nullable=False, comment='承诺书')
    playlet_production_cost = db.Column(db.String(255), nullable=False, comment='制作成本类型')
    screen_writer = db.Column(db.JSON, nullable=False, comment='编剧')
